<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.wl.shixun3.entity.User" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>注册成功</title>
    <link rel="stylesheet" href="./css/success.css" type="text/css">
    <style>
        .success-message {
            background-color: #e8f5e9;
            color: #2e7d32;
            padding: 20px;
            margin: 20px 0;
            border-radius: 4px;
            border: 1px solid #4caf50;
            text-align: center;
        }
        .user-info {
            background-color: #f5f5f5;
            padding: 15px;
            margin: 15px 0;
            border-radius: 4px;
            text-align: left;
        }
        .user-info p {
            margin: 8px 0;
        }
    </style>
</head>
<body>
    <div class="container">
        <h2>注册成功</h2>

        <div class="success-message">
            <% if (request.getAttribute("successMessage") != null) { %>
                <%= request.getAttribute("successMessage") %>
            <% } else { %>
                恭喜您，注册成功！
            <% } %>
        </div>

        <% User newUser = (User) request.getAttribute("newUser");
           if (newUser != null) { %>
            <div class="user-info">
                <p style="color: #666; font-size: 14px; margin-top: 15px;">请妥善保管您的账号信息，安全问题用于找回密码。</p>
            </div>
        <% } %>
        
        <a href="login.jsp" class="btn" style="display: inline-block; margin-top: 20px;">立即登录</a>
        <a href="register.jsp" class="btn" style="display: inline-block; margin-top: 20px; margin-left: 10px; background-color: #757575;">继续注册</a>
    </div>
</body>
</html>

